import Vue from 'vue'
import Router from 'vue-router'
import book from "@/components";

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'login',
      component: ()=>import('../components/Login'),
    },
    {
      path: '/index',
      name: 'index',
      component: ()=>import('../components/index'),
      children:[
        {
          path: '/book',
          name: 'book',
          component: ()=>import('../components/Book'),
        },
        {
          path: '/type',
          name: 'type',
          component: ()=>import('../components/Type'),
        },
        {
          path: '/texture',
          name: 'texture',
          component: ()=>import('../components/Texture'),
        },
        {
          path: '/author',
          name: 'author',
          component: ()=>import('../components/Author'),
        },
        {
          path: '/publisher',
          name: 'publisher',
          component: ()=>import('../components/Publisher'),
        },
        {
          path: '/brand',
          name: 'brand',
          component: ()=>import('../components/Brand'),
        },
        {
          path: '/role',
          name: 'role',
          component: ()=>import('../components/Role'),
        },
        {
          path: '/user',
          name: 'user',
          component: ()=>import('../components/User'),
        },
        {
          path:'/purchasingapproval',
          name:'purchasingapproval',
          component:()=>import('../components/Purchasingapproval')
        },
        {
          path:'/applydate',
          name:'applydate',
          component:()=>import('../components/Applydate')
        },{
        path:'/purchase',
          name:'purchase',
          component:()=>import('../components/Purchase')
        },
        {
          path:'/purchaserecord',
          name:'purchaserecord',
          component:()=>import('../components/Purchaserecord')
        },
        {
          path:'/allinventory',
          name:'allinventory',
          component:()=>import('../components/Allinventory')
        },
        {
          path:'/inventoryrecords',
          name:'inventoryrecords',
          component:()=>import('../components/Inventoryrecords')
        },
        {
          path:'/order',
          name:'order',
          component:()=>import('../components/Order')
        },
        {
          path:'/allorders',
          name:'allorders',
          component:()=>import('../components/Allorders')
        },
        {
          path:'/salesreturn',
          name:'salesreturn',
          component:()=>import('../components/Salesreturn')
         },
        {
          path:'/activity',
          name:'activity',
          component:()=>import('../components/Activity')
        }
      ]
    }
  ]
})
